package com.company.www;

import java.util.concurrent.CountDownLatch;

public class Main {
    public static void main(String[] args) {
        CountDownLatch countDownLatch = new CountDownLatch(3);

        Worker w1 = new Worker(countDownLatch, "张三");
        Worker w2 = new Worker(countDownLatch, "李四");
        Worker w3 = new Worker(countDownLatch, "王五");

        Boss boss = new Boss(countDownLatch);

        new Thread(w1).start();
        new Thread(w2).start();
        new Thread(w3).start();
        new Thread(boss).start();
    }
}
